#include "SMPPDestPort.hpp"

using namespace smpp::pdu;

DestPort::DestPort(const quint16 nValue):
TLV(TLVtags::TAG_DEST_PORT,2),_Value(nValue){}

DestPort::DestPort(const DestPort &nDestPort):
TLV(nDestPort),_Value(nDestPort.getValue()){}

bool DestPort::operator ==(const DestPort &nDestPort) const{
	return (TLV::operator == (nDestPort) && 
			_Value == nDestPort.getValue());
}

bool DestPort::operator !=(const DestPort &nDestPort) const{
	return !this->operator == (nDestPort);
}

DestPort &DestPort::operator = (const DestPort &nDestPort){
	if(*this == nDestPort)
		return *this;
	TLV::operator = (nDestPort);
	_Value = nDestPort.getValue();
	return *this;
}

void DestPort::setValue(const quint16 nValue){
	_Value = nValue;
}

const quint16 DestPort::getValue() const{
	return _Value;
}
